package com.hs.spring.starter;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(BeanProperties.class)
public class BeanAutoConfiguration {

    private BeanProperties beanProperties;

    public BeanAutoConfiguration(BeanProperties beanProperties){
        this.beanProperties = beanProperties;
    }

    @Bean
    public Student getStudent(){
        return new Student(beanProperties);
    }
}
